﻿@{
    Layout = "~/Views/Shared/_Default.cshtml";
    var t_article = (Model.Translations as IEnumerable<dynamic>)
        .SingleOrDefault(x => JDM.Int32(x.Language.EntityID) ==
            JDM.Int32(Svc.Localization.Language.EntityID));
    ViewBag.PageTitle = T(Res.Name("Title"), t_article != null ? JDM.String(t_article.Title) : String.Empty);
    ViewBag.PageHistory = true;
}

@section Breadcrumb
{
    <span class="separator">/</span>
    <a href="@Url.Action(Loc.Act("Index").Localized())">@T(Res.In("WebPortal").Of("Navigation").Name("Articles")))</a>
}
@section Toolbar
{
    <span>@Svc.DateTimeRel((DateTime)JDM.DateTime(Model.PublishedOn))</span>
}
@section Sidebar
{
    @if(Model.FileGroup != null)
    {
        <div class="box">
            <header>
                <h3>@T(Res.Name("Attachments"))</h3>
            </header>
            <section>
            @{ 
                Html.RenderAction(Loc.Act("_Attachments").Ctrl("Media").Set(new
                {
                    groupID = JDM.Int32(Model.FileGroup.EntityID)
                }).Localized());
            }
            </section>
        </div>
    }
}
<div class="box">
    <section>
    @{
        Html.RenderPartial("_Text");
    }
    </section>
</div>
